import Vue from "vue";
import VueRouter from "vue-router";
import home from "@/components/home";
import photos from "@/components/photos";
import upload from "@/components/upload";
import more from "@/components/more";
import login from "@/components/login";
import register from "@/components/register";
import image_detail from "@/components/common/image_detail"

Vue.use(VueRouter);
const router = new VueRouter({
  mode: "history",
  routes: [
    {
      path: "/",
      redirect: "home",
    },
    {
      path: "/home",
      name: "home",
      component: home,
    },
    {
      path: "/photos",
      name: "photos",
      component: photos,
    },
    {
      path: "/upload",
      name: "upload",
      component: upload,
    },
    {
      path: "/more",
      name: "more",
      component: more,
    },
    {
      path: "/login",
      name: "login",
      component: login,
    },
    {
      path: "/register",
      name: "register",
      component: register,
    },
    {
      path: "/image_detail/?id=:id",
      name: "image_detail",
      component: image_detail,
    },
  ],
});

export default router;
